refactor logging (#582)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 5 Jun 2020 19:21:34 +0000 (13:21 -0600)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2020 19:21:34 +0000 (13:21 -0600)
commit3ae9fe3d8334322388de45665614d1221b4743d5
tree66b75c9f9af485cdb301c07e3ac9cd68caa50b44
parentda13995f26c6b773d1999fbb2ada977af9ea0f65
refactor logging (#582)

* refactor logging to

allow the noreturn attribute on fatal() to be used by analysis
tools while still generating messages with an output stream.

* Add our own message handler.

This allows us to use stderr on windows.  The default message handler
routes QDebug messages to the debugger on windows.

* flush stdout before message logger writes to stderr.

* flush stdout before writing to standard error for fatal().

or else messages can appear in the wrong order on Windows.
18 files changed:
arcdist.cc
cet_util.cc
defs.h
fatal.cc
garmin_fit.cc
garmin_tables.cc
gbfile.cc
geojson.cc
gpx.cc
interpolate.cc
main.cc
qstarz_bl_1000.cc
src/core/logging.h
stmsdf.cc
subrip.cc
unicsv.cc
waypt.cc
xcsv.cc